1. Technical Field
The present invention relates generally to the field of data processing systems and, more specifically to an adaptive fast write cache in storage devices.
2. Description of Related Art
Data processing systems typically include a host computer having a processor and a memory, a storage system, as well as other devices. The storage system can be of any of a number of types (e.g., a tape storage device, a floppy diskette storage device, a disk storage device, etc.), or can include a combination of different types of storage devices.
Application programs executing on the processor typically operate on data that is stored in the storage system. The data from the storage system may be copied to the memory for more efficient access by the host computer. When data in the memory is no longer needed by an application program, the processor typically reads the data from the memory and writes the data to the storage system. Thus, application programs executing on the host computer typically perform numerous reads from and writes to the storage system.
Data stored in the storage device is typically organized in units termed “blocks”, where each block includes a number of bytes of data (e.g., 512 bytes). Application programs executing on the host computer typically operate on logical objects (e.g., files) that include a collection of one or more blocks of data that are logically related. The computer system typically includes one or more mapping layers that map from the logical objects operated upon by the application programs to the particular physical locations in the storage system where the blocks that make up the logical object are stored.
The blocks of data that make up a particular logical object are mapped to either sequential or non-sequential physical locations in the storage system. In a typical computer system, the storage system has no understanding that a number of non-sequential physical blocks are logically related. When the host computer executes an operation on a logical object having a plurality of blocks of data stored in non-sequential physical locations in the storage device, the non-sequential blocks must be accessed in separate operations from the storage system, which can impact the performance of the computer system. Thus, sequential data may be read from and written to a storage device must more quickly than non-sequential data.
The time taken during a data writing process can be reduced using a disk cache. When a disk drive controller receives a write command, the data to be stored on the disk is stored in the disk cache. This data is then transferred to the storage device from the disk cache.
During a typical write operation, the data is first written to the disk. When the data has been successfully written to the disk, the disk drive controller will return a command complete status to the processor indicating a successful completion to the write process. If the data is not successfully written to the disk, the command complete status will not be returned. Using this typical write operation, the processor will always know what data has been written to the disk.
A FAST WRITE process is also known in the art and has been frequently used. When the FAST WRITE process is used, the write process is reported to the processor as being complete once the data to be written to the disk is stored in the FAST WRITE cache. Thus, the processor believes that the data has been written to the disk before it actually has been. The data is then written to the disk at a later time.
Although the FAST WRITE process will speed up the data storage process, it can cause data corruption in some cases. The computer system may lose power after the disk drive controller reported a command complete status but before all of the data was written to the disk. If the processor receives a command complete status and power is lost prior to the data actually being stored on the disk, once a reboot occurs, the operating system will believe all of the data that had been stored in the FAST WRITE cache was stored on the disk.
Therefore, a need exists for a method, system, and product for an adaptive fast write cache in storage devices whereby a FAST WRITE operation is executed only for particular types of data.